package com.yunyao.framework.service;

import com.yunyao.common.dto.excel.ContractExcelDto;
import com.yunyao.common.dto.excel.ContractMaterialExcelDto;
import com.yunyao.framework.dto.contract.ContractMaterialImportDto;
import com.yunyao.framework.dto.purchase.PurchaseContractApprovalDto;
import com.yunyao.framework.dto.purchase.PurchaseContractSaveDto;
import com.yunyao.common.dto.PurchaseDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.purchase.PurchaseContractSubmitApprovalDto;
import com.yunyao.framework.vo.purchase.PurchaseInfoVO;
import com.yunyao.framework.vo.purchase.PurchaseVO;

import java.util.List;

/**
 * @author xingjishuai
 * @date 2024-07-22
 */
public interface PurchaseService {
    /**
     * 获取采购列表
     * @param purchaseDto
     * @return
     */
    YResult<PageResult<PurchaseVO>> pageList(PurchaseDto purchaseDto);

    /**
     * 获取采购合同
     * @param id
     * @return
     */
    YResult<PurchaseInfoVO> getPurchaseContractById(String id);

    /**
     * 保存采购合同
     *
     * @param saveDto
     * @return
     */
    YResult<String> saveInfo(PurchaseContractSaveDto saveDto);

    /**
     * 删除采购合同
     * @param id
     * @return
     */
    YResult<String> deleted(String id);

    /**
     * 提交审批
     * @param approvalDto
     * @return
     */
    YResult<String> submitApproval(PurchaseContractSubmitApprovalDto approvalDto);
    /**
     * 审批
     * @param approvalDto
     * @return
     */
    YResult<String> approval(PurchaseContractApprovalDto approvalDto);


    /**
     * 导入合同材料信息
     *
     * @param importDto
     * @return
     */
    YResult<String> importContractMaterial(ContractMaterialImportDto importDto);


    /**
     * 导出的合同材料信息
     *
     * @param contractId
     * @return
     */
    List<ContractMaterialExcelDto> exportMaterial(String contractId);

    List<ContractExcelDto> export(PurchaseDto purchaseDto);


}
